package com.shangjinrong.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 标的出借记录表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "lend_item")
public class LendItem {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 投资编号
     */
    @TableField(value = "lend_item_no")
    private String lendItemNo;

    /**
     * 标的id
     */
    @TableField(value = "lend_id")
    private Long lendId;

    /**
     * 投资用户id
     */
    @TableField(value = "invest_user_id")
    private Long investUserId;

    /**
     * 投资人名称
     */
    @TableField(value = "invest_name")
    private String investName;

    /**
     * 投资金额
     */
    @TableField(value = "invest_amount")
    private BigDecimal investAmount;

    /**
     * 年化利率
     */
    @TableField(value = "lend_year_rate")
    private BigDecimal lendYearRate;

    /**
     * 投资时间
     */
    @TableField(value = "invest_time")
    private Date investTime;

    /**
     * 开始日期
     */
    @TableField(value = "lend_start_date")
    private Date lendStartDate;

    /**
     * 结束日期
     */
    @TableField(value = "lend_end_date")
    private Date lendEndDate;

    /**
     * 预期收益
     */
    @TableField(value = "expect_amount")
    private BigDecimal expectAmount;

    /**
     * 实际收益
     */
    @TableField(value = "real_amount")
    private BigDecimal realAmount;

    /**
     * 状态（0：默认 1：已支付 2：已还款）
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(1:已删除，0:未删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean isDeleted;

    public static final String COL_ID = "id";

    public static final String COL_LEND_ITEM_NO = "lend_item_no";

    public static final String COL_LEND_ID = "lend_id";

    public static final String COL_INVEST_USER_ID = "invest_user_id";

    public static final String COL_INVEST_NAME = "invest_name";

    public static final String COL_INVEST_AMOUNT = "invest_amount";

    public static final String COL_LEND_YEAR_RATE = "lend_year_rate";

    public static final String COL_INVEST_TIME = "invest_time";

    public static final String COL_LEND_START_DATE = "lend_start_date";

    public static final String COL_LEND_END_DATE = "lend_end_date";

    public static final String COL_EXPECT_AMOUNT = "expect_amount";

    public static final String COL_REAL_AMOUNT = "real_amount";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";
}